﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;

namespace Pyramid_Game
{
    public class Incorrect : GameScreen
    {
        Texture2D incorrectTexture;
        double removeTime;
        bool remove = false;

        public Incorrect()
        {
            
        }

        public override void LoadContent(ContentManager content)
        {
            incorrectTexture = content.Load<Texture2D>("Texture/incorrect");
        }
        public override void Update(Touch touch, GameTime gameTime)
        {
            if (!remove)
            {
                removeTime = gameTime.TotalGameTime.TotalSeconds;
                remove = true;
            }

            if(removeTime + 0.2 < gameTime.TotalGameTime.TotalSeconds)
                screenManager.RemoveScreen(this);

            foreach (GestureSample gesture in touch.Gestures)
            {
                if (gesture.GestureType == GestureType.Tap)
                {
                    screenManager.RemoveScreen(this);
                }
            }


        }
        public override void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            spriteBatch.Draw(incorrectTexture, new Rectangle(0, 0, incorrectTexture.Width, incorrectTexture.Height), Color.White);
        }
    }
}
